{% extends "base.html" %}
{% autoescape None %}
{% block title %}BBox{% end %}

{% block body %}
<div class="container">
    <div class="row">
        <div class="span10">
            <h1> {{ xhtml_escape(space_now) }} </h1>

            <form class="navbar-search pull-left" method="post">
            	<select class="span2" name="logtype">
                {% for mtype in logtype %}
                  <option>{{mtype}}</option>
                {% end %}
                </select>
                <br class="c"/>
                <input type="hidden" name="space_now" value="{{ xhtml_escape(space_now) }}">
  				<textarea name="logcontent" placeholder="Write down your idea" autofocus="autofocus" autocomplete="off" style="height:80px; width:550px;"></textarea>
                <button type="submit" class="btn">Submit</button>
			</form>
			<br class="c"/>
			{% for l in logs %}
				<p>[{{ datetime.datetime.fromtimestamp(l['ts']).strftime("%Y-%m-%d %H:%M") }}] 
                {% for tag in l['tags'] %} [{{ xhtml_escape(tag) }}] {% end %}
                {{ markdown(l['content']) }} </p>
			{% end %}
        </div>
    </div>
</div>

{% end %}
